package com.kclm.pojo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Author : lvhx
 * @Date: 2025/10/31 10:54
 * @Description:
 */
public class User {
    private  Integer id;
    private String username;

    public User() {
        Logger logger = LoggerFactory.getLogger(User.class);
        logger.info("我是一条日志消息");
        System.out.println("User无参数构造方法---");
    }

    public User(Integer id, String username) {
        System.out.println("user有参构造方法");
        this.id = id;
        this.username = username;
    }

    public User(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                '}';
    }
}
